#include<stdio.h>
#include<stdlib.h>
#include<sys/types.h>
#include<unistd.h>
int main()
{
    pid_t id = fork();
    if(id<0)
    {
        perror("fork");
        return 1;
    }
    else if(id==0)//child process
    {
        printf("I am child process!My pid::%d,My id::%d\n",getpid(),id);
        sleep(5);
        exit(EXIT_SUCCESS);
    }
    else//parent child
    {
        printf("I am parent process!My pid::%d,My id::%d\n",getpid(),id);
        sleep(30);
    }
    return 0;

}
